
/**
  ******************************************************************************
  * Copyright 2021 The Microbee Authors. All Rights Reserved.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * 
  * http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
  * @file       uitc_vehicle_global_position.h
  * @author     baiyang
  * @date       2023-3-1
  ******************************************************************************
  */

#pragma once

#ifdef __cplusplus
extern "C"{
#endif

/*----------------------------------include-----------------------------------*/
#include <uITC/uITC.h>
/*-----------------------------------macro------------------------------------*/
ITC_DECLARE(vehicle_global_position);
/*----------------------------------typedef-----------------------------------*/
typedef struct
{
    uint64_t timestamp;                // time since system start (microseconds)
    uint64_t timestamp_sample;         // the timestamp of the raw data (microseconds)
    double lat;                        // Latitude, (degrees)
    double lon;                        // Longitude, (degrees)
    float alt;                         // Altitude AMSL, (meters)
    float alt_ellipsoid;               // Altitude above ellipsoid, (meters)
    float delta_alt;                   // Reset delta for altitude
    float eph;                         // Standard deviation of horizontal position error, (metres)
    float epv;                         // Standard deviation of vertical position error, (metres)
    float terrain_alt;                 // Terrain altitude WGS84, (metres)
    uint8_t lat_lon_reset_counter;     // Counter for reset events on horizontal position coordinates
    uint8_t alt_reset_counter;         // Counter for reset events on altitude
    bool terrain_alt_valid;            // Terrain altitude estimate is valid
    bool dead_reckoning;               // True if this position is estimated through dead-reckoning
} uitc_vehicle_global_position;
/*----------------------------------variable----------------------------------*/

/*-------------------------------------os-------------------------------------*/

/*----------------------------------function----------------------------------*/

/*------------------------------------test------------------------------------*/

#ifdef __cplusplus
}
#endif



